Skip to content

Add JSON download modebar button - #7963

Open
gokul-debugger wants to merge 2 commits into
plotly:masterfrom
gokul-debugger:feat/download-figure-json
Open

Add JSON download modebar button#7963
gokul-debugger wants to merge 2 commits into
plotly:masterfrom
gokul-debugger:feat/download-figure-json

Conversation

@gokul-debugger

Copy link
Copy Markdown

What does this PR do?

Adds an opt-in downloadJson modebar button for exporting the current Plotly figure as JSON.

The button can be enabled through:

config: {
    modeBarButtonsToAdd: ['downloadJson']
}

or with layout.modebar.add.

It uses Plotly's existing full-json export pipeline, preserving the established serialization behavior for figure data, layout, config, typed arrays, and version metadata. Download failures are reported through the existing Plotly notifier.

Testing

  • All 104 modebar Jasmine tests passed
  • Biome lint passed
  • Plotly syntax checks passed
  • Plot schema regenerated successfully

Closes #7917

@gokul-debugger
gokul-debugger marked this pull request as ready for review August 13, 2026 22:35

@camdecoster camdecoster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these files got a lot of updates for the upcoming v4.0 release. Would you be able to base your changes off of that branch (called v4.0) and update this PR (or create a new one)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add modebar button to download figure JSON

2 participants